package com.lgc.javathread.threadPoolTest;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ScheduledThreadPoolProgram {
    public static void main(String[] args) {
        ExecutorService pool= Executors.newScheduledThreadPool(5);
        for (int i = 0; i < 10; i++) {
            Runnable task=new MyRunnable2(i);
            pool.execute(task);
        }
    }
}
